package main

import (
	. "LsEngine"
	"fmt"
	"strconv"
	. "tksConfig"
	. "tksLog"
	. "tksStatic"
	. "tksTcp"
)

func registerCmd() {
	RegisterCmd(CmdLoginReq, Login)
	RegisterCmd(CmdEnrollReq, Enroll)
}

func main() {
	LoadConfig("config.json")
	LoadUser()
	port, _ := Config.Get("server").Get("port").Int()
	//
	InitLogger("ls")
	//
	registerCmd()
	err := NewServer(":" + strconv.Itoa(port))
	if err != nil {
		fmt.Println(err)
	}
}
